package cn.hyatt.auth.dto.systemMenu;

import cn.hyatt.auth.enums.MenuType;
import cn.hyatt.common.utils.DateTimeUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 菜单Vo
 * @author hyatt
 */
@Getter
@Setter
@Schema(name = "菜单Vo")
public class SystemMenuVo implements Serializable {
    @Serial
    private static final long serialVersionUID = 42L;

    @Schema(name = "主键Id")
    private Long id;

    @Schema(name = "创建者")
    private Long createBy;

    @JsonFormat(pattern = DateTimeUtil.COMMON_DATE_TIME_FORM)
    @Schema(name = "创建时间")
    private LocalDateTime createTime;

    @Schema(name = "更新者")
    private Long updateBy;

    @JsonFormat(pattern = DateTimeUtil.COMMON_DATE_TIME_FORM)
    @Schema(name = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "上级菜单")
    private Long parentId;

    @Schema(description = "菜单类型")
    private MenuType type;

    @Schema(description = "菜单标题")
    private String title;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "是否显示：true显示 false隐藏")
    private Boolean visible;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "路由名称")
    private String name;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "是否为外链：true是 false否")
    private Boolean link;

    @Schema(description = "重定向")
    private String redirect;

    @Schema(description = "权限字符串")
    private String permissions;

    @Schema(description = "是否启用：true启用 false未启用")
    private Boolean enabled;

}
